package com.matrix.media.mapper;

import com.github.pagehelper.Page;
import com.matrix.media.dto.MixedCutProjectPageQueryDTO;
import com.matrix.media.entity.project.MixedCutProject;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface MixedCutProjectMapper {

    Page<MixedCutProject> pageQuery(MixedCutProjectPageQueryDTO mixedCutProjectDTO);

    @Insert("insert into mixed_out_project(id, project_name, update_time, created_time, modifier_user_id, modifier_user_name, company_id)" +
            " VALUES " +
            "(#{id}, #{projectName}, #{updateTime}, #{createdTime}, #{modifierUserId}, #{modifierUserName}, #{companyId})")
    void insert(MixedCutProject mixedCutProject);


    @Delete(" DELETE FROM mixed_cut_project WHERE id = #{id}")
    void deleteById(String id);


    // 修改方法
    void update(MixedCutProject project);
}
